package com.merry.spring5.lifecycle;

import javax.annotation.Resource;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author ybzou
 * factoryBean的一个例子
 */
public class VerifyLifeCycleFactory implements FactoryBean<VerifyLifeCycle> {
    @Resource
    VerifyLifeCycle verifyLifeCycle=new VerifyLifeCycle();

    public VerifyLifeCycle getObject() {
        return verifyLifeCycle;
    }

    public Class<?> getObjectType() {
        return verifyLifeCycle.getClass();
    }

    public boolean isSingleton() {
        return true;
    }
}
